package me.tuyou.stream;

import org.apache.flink.api.java.tuple.Tuple;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class ProjectTest {

    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        DataStreamSource<Tuple2<Integer, Integer>> dataSource = env.fromElements(Tuple2.of(1,1), Tuple2.of(2,2), Tuple2.of(3,3));
        SingleOutputStreamOperator<Tuple> stream = dataSource.project(0);
        stream.print();
        env.execute();
    }
}
